efa notification subscribers add-https

Registers a new subscriber to the Notification service with an HTTPS webhook.

Syntax

efa notification subscribers add-https [ --url address | --username name | --password password | --insecure | --cacert string | --filter strings | --conn-timeout int | --device-event strings | --minimum-severity string ]

Parameters

--url address
(Required) Specifies the URL of the subscriber. Can be either IPv4 or IPv6 address.
--username name
(Required) Specifies the user name for access to the URL.
--password password
(Optional) Specifies the password for the user name.
--insecure
(Optional) Indicates that insecure SSL connection and transfers are used for sending notifications. By default, the SSL connection and transfers are secure.
--cacert string
(Optional) Local path to the cacert pem file for SSL verification.
--filter strings
(Optional) Comma separated filter values. Possible values are “DEVICE_EVENTS” - RAS/syslog events from devices, “APP_ALARMS” - fault alarms from application,“APP_ALERTS” - fault alerts from application, “APP_EVENTS” - task events from application. If no filters are provided it means all types. Example: --filter DEVICE_EVENTS,APP_ALARMS,APP_ALERTS,APP_EVENTS.
--conn-timeout int
Timeout to open a connection to the server (default 10). (Optional)
--device-event strings
Comma separated filter values of allowed device event notifications. Possible values are "raslog", “audit-configuration”, “audit-firmware” and “audit-security”. If no sub-filters are provided it is equivalent to including all message types, e.g. --device-event raslog,audit-configuration,audit-firmware,audit-security. (Optional)
--minimum-severity string
Value of the minimum severity level value for all previously unfiltered DEVICE_EVENTS, APP_ALARMS, APP_ALERTS, and APP_EVENTS. Possible values are "critical", “error”, “warning” and “info”. If “info” or no sub-filter is provided then no filtering is done. Input of a higher level severity such as “critical”, “error” or “warning” results in all messages of lower severity to be filtered out. (Optional)

Examples

The following example registers a new HTTPS webhook subscriber to the Notification Service.

efa notification subscribers add-https --url https://path/to/my/service:port 
--username myusername --password mypassword --insecure
Successfully registered subscriber.

+-----------+-----------------------------------------------------------------------+
| attribute | value                                                                 |
+-----------+-----------------------------------------------------------------------+
| id        | 1                                                                     |
+-----------+-----------------------------------------------------------------------+
| handler   | http                                                                  |
+-----------+-----------------------------------------------------------------------+
| endpoint  | https://path/to/my/service:port                                     |
+-----------+-----------------------------------------------------------------------+
| config    | {"cacert":"","insecure":true,"password":"mypassword",
              "username":"myusername"}                                              |
+-----------+-----------------------------------------------------------------------+
Notification Subscriber ID=1
--- Time Elapsed: 2.203878641s ---

The following example enables webhook subscriber with only APP_ALERTS.

#efa notification subscribers add-https --url https://127.0.0.1:5000 --username jarvis
 --password vision --insecure --filter APP_ALERTS 
Successfully registered subscriber. 
  			
+-----------+----------------------------------------------------------------------------------+ 
| attribute | value                                                                            | 
+-----------+----------------------------------------------------------------------------------+ 
| id        | 18                                                                               | 
+-----------+----------------------------------------------------------------------------------+ 
| handler   | http                                                                             | 
+-----------+----------------------------------------------------------------------------------+ 
| endpoint  | https://127.0.0.1:5000                                                           | 
+-----------+----------------------------------------------------------------------------------+ 
| config    | {"cacert":"","filters":["APP_ALERTS"],"insecure":true,"password":"vision","usern | 
|           | ame":"jarvis"}                                                                   | 
+-----------+----------------------------------------------------------------------------------+ 
Notification Subscriber ID=18 
--- Time Elapsed: 2.148580068s ---
The following example enables webhook subscriber with only APP_ALARM and APP_ALERTS.
#efa notification subscribers add-https --url https://127.0.0.1:5000 --username jarvis 
--password vision --insecure --filter APP_ALARMS,APP_ALERTS 
Successfully registered subscriber. 

+-----------+----------------------------------------------------------------------------------+ 
| attribute | value                                                                            | 
+-----------+----------------------------------------------------------------------------------+ 
| id        | 18                                                                               | 
+-----------+----------------------------------------------------------------------------------+ 
| handler   | http                                                                             | 
+-----------+----------------------------------------------------------------------------------+ 
| endpoint  | https://127.0.0.1:5000                                                           | 
+-----------+----------------------------------------------------------------------------------+ 
| config    | {"cacert":"","filters":”APP_ALARMS”,"APP_ALERTS"],"insecure":true,              | 
|           | “password":"vision",”username":"jarvis"}                                         | 
+-----------+----------------------------------------------------------------------------------+ 
Notification Subscriber ID=18 
--- Time Elapsed: 2.148580068s ---
The following example enables webhook subscriber with only DEVICE_EVENTS of type audit.
#efa notification subscribers add-https --url https://127.0.0.1:5000 –username jarvis 
--password vision --insecure --filter DEVICE_EVENTS 
--device-event audit-firmware,audit-security,audit-configuration 
Successfully registered subscriber. 
						
+-----------+----------------------------------------------------------------------------------+ 
| attribute | value                                                                            | 
+-----------+----------------------------------------------------------------------------------+ 
| id        | 18                                                                               | 
+-----------+----------------------------------------------------------------------------------+ 
| handler   | http                                                                             | 
+-----------+----------------------------------------------------------------------------------+ 
| endpoint  | https://127.0.0.1:5000                                                           | 
+-----------+----------------------------------------------------------------------------------+ 
| config    | {"cacert":"","filters":["DEVICE_EVENTS"],                                        | 
|           |”device-event”:[”audit-firmware”,audit-security",”audit-configuration”],          | 
|           |"insecure":true,"minimum-severity":"","password":"vision",                       | 
|           |”username":"jarvis"}                                                              | 
+-----------+----------------------------------------------------------------------------------+ 
Notification Subscriber ID=18 
--- Time Elapsed: 2.148580069s ---